// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SEC_ROLE
// * CreateDate    : 2011/9/27 11:24:18
// * Creater       : CodeSmith
// * LastChangeDate: 2011/9/27 11:24:18
// * LastChanger   : 2011/9/27 11:24:18
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class SecRoleEntity : EntityBase
    {
        public SecRoleTable TableSchema
        {
            get
            {
                return SecRoleTable.Current;
            }
		}
		
		public SecRoleEntity()
        {

        }
		
		public SecRoleEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.RoleId = Convert.ToString(CommonFunctions.ToObject(dr["ROLE_ID"]));
			this.ParentId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_ID"]));
			this.RoleName = Convert.ToString(CommonFunctions.ToObject(dr["ROLE_NAME"]));
			this.RoleType = Convert.ToString(CommonFunctions.ToObject(dr["ROLE_TYPE"]));
			this.RoleCategory = Convert.ToDecimal(CommonFunctions.ToObject(dr["ROLE_CATEGORY"]));
			this.ExternalUserRole = Convert.ToDecimal(CommonFunctions.ToObject(dr["EXTERNAL_USER_ROLE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.LastModifiedTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_TIME"]));
            this.PositionId = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_ID"]));
        }
		
		public SecRoleEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.RoleId = Convert.ToString(CommonFunctions.ToObject(dr["ROLE_ID"]));
			this.ParentId = Convert.ToString(CommonFunctions.ToObject(dr["PARENT_ID"]));
			this.RoleName = Convert.ToString(CommonFunctions.ToObject(dr["ROLE_NAME"]));
			this.RoleType = Convert.ToString(CommonFunctions.ToObject(dr["ROLE_TYPE"]));
			this.RoleCategory = Convert.ToDecimal(CommonFunctions.ToObject(dr["ROLE_CATEGORY"]));
			this.ExternalUserRole = Convert.ToDecimal(CommonFunctions.ToObject(dr["EXTERNAL_USER_ROLE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.LastModifiedTime = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_TIME"]));
            this.PositionId = Convert.ToString(CommonFunctions.ToObject(dr["POSITION_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SecRoleTable.Current;
            }
        }
		
		#region Perporty List
        public string RoleId
        {
            get { return Convert.ToString(GetData(SecRoleTable.C_ROLE_ID)); }
            set { SetData(SecRoleTable.C_ROLE_ID, value); }
        }
		
        public string ParentId
        {
            get { return Convert.ToString(GetData(SecRoleTable.C_PARENT_ID)); }
            set { SetData(SecRoleTable.C_PARENT_ID, value); }
        }
		
        public string RoleName
        {
            get { return Convert.ToString(GetData(SecRoleTable.C_ROLE_NAME)); }
            set { SetData(SecRoleTable.C_ROLE_NAME, value); }
        }
		
        public string RoleType
        {
            get { return Convert.ToString(GetData(SecRoleTable.C_ROLE_TYPE)); }
            set { SetData(SecRoleTable.C_ROLE_TYPE, value); }
        }
		
        public decimal RoleCategory
        {
            get { return Convert.ToDecimal(GetData(SecRoleTable.C_ROLE_CATEGORY)); }
            set { SetData(SecRoleTable.C_ROLE_CATEGORY, value); }
        }
		
        public decimal ExternalUserRole
        {
            get { return Convert.ToDecimal(GetData(SecRoleTable.C_EXTERNAL_USER_ROLE)); }
            set { SetData(SecRoleTable.C_EXTERNAL_USER_ROLE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(SecRoleTable.C_REMARK)); }
            set { SetData(SecRoleTable.C_REMARK, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(SecRoleTable.C_LAST_MODIFIED_BY)); }
            set { SetData(SecRoleTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime LastModifiedTime
        {
            get { return Convert.ToDateTime(GetData(SecRoleTable.C_LAST_MODIFIED_TIME)); }
            set { SetData(SecRoleTable.C_LAST_MODIFIED_TIME, value); }
        }

        public string PositionId
        {
            get { return Convert.ToString(GetData(SecRoleTable.C_POSITION_ID)); }
            set { SetData(SecRoleTable.C_POSITION_ID, value); }
        }
		
		#endregion
	}
	
	
}	

